package com.py.apis.wemedia;

import com.py.model.admin.dtos.ChannelDto;
import com.py.model.common.dtos.ResponseResult;
import com.py.model.wemedia.pojos.WmChannel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(value = "leadnews-wemedia")
public interface IChannelClient {


    /**
     * 查询远程调用接口
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult findAll(@RequestBody ChannelDto dto);

    /**
     * 新增频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    public ResponseResult save(@RequestBody WmChannel wmChannel);


    /**
     * 删除频道
     * /api/v1/channel/del/{id}
     * @param id
     */

    @GetMapping("/api/v1/channel/del/{id}")
    public void delete(@PathVariable("id") Integer id);


    /**
     * 修改
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    public ResponseResult update(@RequestBody WmChannel wmChannel);


}
